#include<iostream>
#include<queue>
using namespace std;
int n, k, m;
int main()
{
	queue<int>q;
	cin >> n >> k >> m;
	k %= n;
	if (!k) {
		k = n;
	}
	for (int i = 0, j = k; i < n; i++, j++) {
		if (j == n + 1) {
			j = 1;
		}
		q.push(j);
	}
	/*while (q.size()) {
		cout << q.front() << " ";
		q.pop();
	}*/
	int cnt = 1;
	//1 2 3 4 5
	while (q.size()) {
		if (cnt == m) {
			cout << q.front() << endl;
			q.pop();
			cnt = 1;
		}
		else {
			q.push(q.front());
			q.pop();
			cnt++;
		}
	}
	return 0;
}